unit UfrmSimuArith;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DBGridEhGrouping, RzPanel, RzButton, ExtCtrls, GridsEh, DBGridEh,
  DB, ADODB, ActnList, StdCtrls, Mask, RzEdit, RzDBEdit;

type
  TfrmSimuArith = class(TForm)
    DBGridEh1: TDBGridEh;
    RzToolbar1: TRzToolbar;
    RzToolButton1: TRzToolButton;
    RzToolButton2: TRzToolButton;
    RzToolButton3: TRzToolButton;
    RzPanel1: TRzPanel;
    RzPanel2: TRzPanel;
    DataSource1: TDataSource;
    ADOTable1: TADOTable;
    ActionList1: TActionList;
    Action1: TAction;
    Action2: TAction;
    Action3: TAction;
    Action4: TAction;
    RzToolButton4: TRzToolButton;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    RzDBEdit1: TRzDBEdit;
    RzDBEdit2: TRzDBEdit;
    RzDBEdit3: TRzDBEdit;
    procedure Action1Execute(Sender: TObject);
    procedure Action2Execute(Sender: TObject);
    procedure Action3Execute(Sender: TObject);
    procedure Action4Execute(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmSimuArith: TfrmSimuArith;

implementation

uses UdataMoudule;

{$R *.dfm}

procedure TfrmSimuArith.Action1Execute(Sender: TObject);
begin
    DataSource1.DataSet.Append;
end;

procedure TfrmSimuArith.Action2Execute(Sender: TObject);
begin
  DataSource1.DataSet.Edit;
end;

procedure TfrmSimuArith.Action3Execute(Sender: TObject);
begin
    DataSource1.DataSet.Delete;
end;

procedure TfrmSimuArith.Action4Execute(Sender: TObject);
begin
 if DataSource1.DataSet.State  in [dsedit,dsinsert]  then
  DataSource1.DataSet.Post;
end;

end.
